﻿/**
 * id: 用户UID
 * screen_name: 微博昵称
 * name: 友好显示名称，如Tim Yang(此特性暂不支持)
 * province:省份编码（参考省份编码表）
 * city: 城市编码（参考城市编码表）
 * location：地址
 * description: 个人描叙
 * url: 用户博客地址
 * profile_image_url: 自定义图像
 * domain: 用户个性化域名
 * gender: 性别,m--男，f--女,n--未知
 * followers_count: 粉丝数
 * friends_count: 关注数
 * statuses_count: 微博数
 * favourites_count: 收藏数
 * created_at: 创建时间
 * following: 是否已关注(此特性暂不支持)
 * verified: 加V标示
 * 
 * @classDescription 用户角色定义；
 * @author Jeff Kwok
 * @since 2010-07-21 
 */

(function ($) {
	$.fn.extend({
		User : function(userData){
			if (!jQuery.isPlainObject(userData)) {return;}
			user = userData;
			this.id = user.id;
			this.screen_name = user.screen_name;
			this.name = user.name;
			this.province = user.province;
			this.city = user.city;
			this.location = user.location;
			this.description = user.description;
			this.profile_image_url = user.profile_image_url;
			this.domain = user.domain;
			this.gender = user.gender;
			this.friends_count = user.friends_count;
			this.favourites_count = user.favourites_count;
			this.following = user.following;
			this.statuses_count = user.statuses_count;
			this.created_at = user.created_at;
			this.verified = user.verified;
			this.status = new WEIBO.Status(user.status);
			console.log(this);
		}
	});

}(jWEIBO));
